var fwescortparts = { load: function(timer) { var timer = timer; // If we look ten times, and don't find fwescort, clear out if(timer === 10) return clearTimeout(fwescortparts.timerHold); if(typeof fwescort !== "undefined" && typeof fwescort.fw_i === "function") { fwescort.fw_i({ un: 'xzgamers', np: 1, prov: 0, cd: 14932,ll: 15116, al: 0, pa: false, fr: -1, te: 0, dr: 1, seb: 0 }); } else { fwescortparts.timerHold = setTimeout(function() { fwescortparts.load(timer++); }, 300); } }, timerHold: null }; (function() { fwescortparts.load(1); })();